package com.jinsi.controller.zhu;



import com.jinsi.pojo.HomeBrowse;
import com.jinsi.service.zhu.HomeBrowseService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 首页轮播图展示
 * @author 朱浩榕
 * @Date 2022-10-13
 */
@RestController
@RequestMapping("/browse")
@Slf4j
public class HomeBrowseController {

    @Autowired
    private HomeBrowseService homeBrowseService;

    /**
     * 获取所有对象数据
     * @return
     */
    @RequestMapping("/getAll")
    public List<HomeBrowse> getAll(){
        List<HomeBrowse> homeBrowses = homeBrowseService.findAll();
        return homeBrowses;
    }
}
